package jhavelogger.models;

import jhavelogger.visitor.LogVisitor;

/**
 * Represents a type of log that the system can parse.
 * 
 * @author Jared Schlicht
 */
public abstract class JHaveLog {
    private String logSource;
    
    /**
     * Gets the name of the server that sent this log
     * @return name of the server
     */
    public String getLogSource() {
        return logSource;
    }

    /**
     * Sets the name of the server that sent this log
     * @param serverName name of the server
     */
    public void setLogSource(String serverName) {
        this.logSource = serverName;
    }

    /**
     * Performs double-dispatch: allows the visitor to determine the
     * full runtime type of this object
     * @param visitor object to receive this object
     * @return result of visiting this object
     */
    public abstract Object accept(LogVisitor visitor);
}
